/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pneuservis.backend.services;

import java.math.BigDecimal;
import java.util.List;
import javax.ejb.Local;
import pneuservis.backend.to.TyreTypeTO;


/**
 *
 * @author Lukas Stevko
 */
@Local
public interface TyreTypeServiceLocal {
    /**
     * This function create TyreType object in database
     * @param tyreTypeDao object which is desired to be stored in database
     * @throws IllegalArgumentException if tyreTypeDao is null or tyreTypeDao id is already set
     */
    void createTyreType(TyreTypeTO tyreTypeDao);
    /**
     * This function is getting TyreType object from database by id 
     * @param id primary key of service order
     * @return object form database
     */
    TyreTypeTO getTyreType(Long id);
    /**
     * This method updates TyreType attributes in database  
     * @param tyreTypeDao TyreType to be updated 
     * @throws IllegalArgumentException if TyreType id is null or tyreTypeDao does not exist in database 
     */
    void updateTyreType(TyreTypeTO tyreTypeDao);
    /**
     * This method remove TyreType from database 
     * @param tyreTypeDao tyreTypeDao to be removed
     * @throws IllegalArgumentException if tyreTypeDao does not exist in database or tyreTypeDao Type is null
     */
    void removeTyreType(TyreTypeTO tyreTypeDao);
    /**
     * This method return all TyreTypes from database 
     * @return found tyreTypeDaos
     */
    List<TyreTypeTO> getAllTyreTypes();
    /**
     * This method return all tyreTypeDaos with certain rim size
     * @param rimSize rim size of TyreType 
     * @return TyreTypes with selected rim size. Empty collection  is returned if none of tyreTypeDaos does not fit to rim 
     * @throws IllegalArgumentException if rim size is below zero
     */
    List<TyreTypeTO> findTyreTypesByRimSize (int rimSize);
   
    /**
     * This metod serch all tyreTypeDaos with selected widthes
     * @param width desired width
     * @return found tyreTypeDaos
     * @throws IllegalArgumentException if width is below zero
     */
    List<TyreTypeTO> findTyreTypesByWidth(int width);
    
    /**
     * This method serch tyreTypeDaos from database by its profile 
     * @param profile desired profile
     * @return List of tyreTypeDaos. If none of tyreTypeDaos has this profile empty List is returned.
     * @throws IllegalArgumentException if profile is below zero
     */
    List<TyreTypeTO> findTyreTypesByProfile(int profile);
    
    /**
     * This method serch tyreTypeDaos fom database by its season
     * @param season desired season
     * @return List of tyreTypeDaos. If none of tyreTypeDaos has desired season empty List is returned.
     */
    
    /**
     * This method serch all tyreTypeDaos with selected manufacturer in database 
     * @param manufacturer manufacturer of tyreTypeDao
     * @return found tyreTypeDaos
     * @throws IllegalArgumentException if selected manufacturer does not exist
     */
    List<TyreTypeTO> findTyreTypesByManufacturer(String manufacturer);
}
